import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import ProductAdd from './views/ProductAdd.vue'
import ProductList from './views/ProductList.vue'
import Stat from './views/Stat.vue'
import UserList from './views/UserList.vue'
import NotFound from './views/NotFound.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {path: '/',component: Home},
    {path: '/Home',component: Home},
    {path: '/main',component: Main, children:[
      {path:'', component:Stat},
      {path:'stat', component:Stat},
      {path:'plist', component:ProductList},
      {path:'padd', component:ProductAdd},
      {path:'ulist', component:UserList},
    ]},
    {path: '/*',component: NotFound},
  ]
})
